home *** CD-ROM | disk | FTP | other *** search
Text File | 1992-11-18 | 43.9 KB | 1,274 lines | [TEXT/MPS ] |
- C.S.M.P. Digest Mon, 23 Mar 92 Volume 1 : Issue 29
-
- Today's Topics:
-
- MPW(3.2):CIncludes:CTBUtilities ?
- HELP: Creating Color Foils on a Mac.
- Think C 5.02 multisegm. DA bug???
- Problems installing Object Master
- Book for TCL
- Problems using bison/flex with THINK C
- TCL tool palette code?
- CTB CMChoose question
- Want a preferences-file object? (was Re: Preference files: best way?)
- mounting a remote drive. Source code request...
- APDA
- Bad F-Line Instruction and MSWORD?
- How do you use ANSI and multitasking under THINK C & System 7.0?
- Think C libraries with Think Pascal projects, how?
-
-
- The Comp.Sys.Mac.Programmer Digest is moderated by Michael A. Kelly.
-
- These digests are available (by using FTP, account anonymous, your email
- address as password) in the pub/mac/csmp-digest directory on ftp.cs.uoregon.
- edu (try skinner.cs.uoregon.edu if that doesn't work). This is also the home
- of the comp.sys.mac.programmer Frequently Asked Questions list.
-
- These digests are also available via email. Just send a note saying that you
- want to be on the digest mailing list to mkelly@cs.uoregon.edu, and you will
- automatically receive each new digest as it is created.
-
- The articles in these digests are taken directly from comp.sys.mac.programmer.
- They are not edited; all articles included in this digest are in their original
- posted form. The only articles that are -not- included in these digests are
- those which didn't receive any replies (except those that give information
- rather than ask a question). All replies to each article are concatenated
- onto the original article in the order in which they were received. Article
- threads are not added to the digests until the last article added to the
- thread is at least one month old (this is to ensure that the thread is dead
- before adding it to the digests).
-
- Send administrative mail to mkelly@cs.uoregon.edu.
-
- -------------------------------------------------------
-
- From: Meessen@slig.ucl.ac.be (Christophe Meessen)
- Subject: MPW(3.2):CIncludes:CTBUtilities ?
- Date: 17 Feb 92 16:14:30 GMT
- Organization: Universite Catholique de Louvain (Belgium)
-
- In MPW 3.2 there is a .h file called CTBUtilities.
-
- It contains the prototype of a StandardNBP routine which shows a dialog
- allowing to choose a name on the network as in the chooser DA.
-
- I can't find any specifications for this function in Inside Mac, in MPW
- manuals and technical notes.
-
- Is this utility a toolbox function ?
-
- Can we use this utility in programs ?
-
- What is the compatibility domain of this utility ?
- (it seems to crash Mac si (7.0) but work fine on Classic (7.0) and
- mac plus (7.0) )
-
- I realy need this utility. I could write my own but this one would save me
- a lot of programming and debuging time!
-
- Chris.
-
- Meessen@slig.ucl.ac.be
-
-
-
- - -------------------------
-
- From: beard@ux5.lbl.gov (Patrick C Beard)
- Subject: MPW(3.2):CIncludes:CTBUtilities ?
- Date: 21 Feb 92 23:22:07 GMT
- Organization: Berkeley Systems, Inc.
-
- In article <1992Feb17.161430.8753@info.ucl.ac.be> Meessen@slig.ucl.ac.be (Christophe Meessen) writes:
- #In MPW 3.2 there is a .h file called CTBUtilities.
- #
- #It contains the prototype of a StandardNBP routine which shows a dialog
- #allowing to choose a name on the network as in the chooser DA.
- #
- #I can't find any specifications for this function in Inside Mac, in MPW
- #manuals and technical notes.
- #
- #Is this utility a toolbox function ?
- #
- #Can we use this utility in programs ?
- #
- #What is the compatibility domain of this utility ?
- #(it seems to crash Mac si (7.0) but work fine on Classic (7.0) and
- #mac plus (7.0) )
- #
- #I realy need this utility. I could write my own but this one would save me
- #a lot of programming and debuging time!
- #
- #Chris.
- #
- #Meessen@slig.ucl.ac.be
-
-
- This is documented in "Inside the Macintosh Communications Toolbox", in
- the Comm Toolbox Utilities chapter. It used to be called "NuLookup"
- and is now (according to the MPW 3.2 interfaces) called StandardNBP. The
- names have changed, but not the parameters. Until you posted this question,
- I didn't know the name had changed. Guess I'm behind in reading release notes.
-
- Patrick C. Beard
- Berkeley Systems, Inc.
-
-
-
- ---------------------------
-
- From: mouli@ut-emx.uucp (Chandramouli. V)
- Subject: HELP: Creating Color Foils on a Mac.
- Date: 18 Feb 92 23:55:09 GMT
- Organization: The University of Texas at Austin, Austin, Texas
-
- I am interested in creating color foils (transparencies for overhead
- projection) using a Mac and a HP plotter. I was wondering if it is
- possible to create an output file in HPGL (HP Graphics Language)
- format on any of the popular software packages like PowerPoint,
- MacDraw or SuperPaint ?
-
- Right now I have an Apple LaserWriter (B/W PostScript) connected to
- my Mac and I get only the PostScript option on the 'print' menu, on
- all the software mentioned above. Do I need to install a driver to
- plot the files on the HP plotter ? If so, can you please let me
- know where it is available, either commercially or public domain ?
-
- Thanks in advance !
-
- Chandramouli. mouli@emx.utexas.edu 18 Feb 1992
- - -------------------------------------------------------------------
- Microelectronics Research Center in the University of Texas at Austin
- - -------------------------------------------------------------------
-
-
-
- - -------------------------
-
- From: derosa@rtsg.mot.com (John DeRosa)
- Subject: Creating Color Foils (Overheads) on a Mac
- Organization: Motorola Inc., Cellular Infrastructure Group
- Date: Thu, 20 Feb 1992 14:38:26 GMT
-
- >I am interested in creating color foils (transparencies for overhead
- >projection) using a Mac and a HP plotter. I was wondering if it is
- >possible to create an output file in HPGL (HP Graphics Language)
- >format on any of the popular software packages like PowerPoint,
- >MacDraw or SuperPaint ?
-
- MacPlot by MicroSpot is just what you want.
-
- It can drive a large variety of plotters from every application
- that I can think of. We have a HP7550A, "D" sized plotter.
- Works fine, lasts a long time.
-
- They have at least two versions, Standard and Professional.
- The Professional version has drivers for a wider variety of
- plotters (larger "E" sized ones, etc).
-
- This works for plotters that are directly connected to the
- mac or for plotters that are "on the network" with
- products like NetSerial by Shiva.
- --
- = Enjoy! John DeRosa, Motorola, Inc, Digital Cellular Systems =
- = (thanks) derosa@rtsg.mot.com motcid!derosaj@uunet.uu.net =
- = (a 10^6) uunet!motcid!derosaj N1111@applelink.apple.com =
-
-
-
- ---------------------------
-
- Subject: Think C 5.02 multisegm. DA bug???
- From: guelzow@brandonu.ca
- Date: 18 Feb 92 09:21:54 CST
- Organization: Brandon University, Brandon, Manitoba, Canada
-
- Does anybody know anything about a bug in Think C 5.02 (and 4) related to the
- header used for deskaccessories?
- I am writing a multisegment deskaccessory. I usually cannot make it cause a
- system error except in a very specific kind of circumstances:
- On an LC (and possibly other machines, but not on a Plus) running system 6.07
- without MF (and possibly other system configurations): After the DA has been
- freshly installed, i.e. the computer has not been rebooted since the DA was
- moved into the System by DA mover 3.8 or 4.1 and the DA was not already in
- the system, selecting the DA from the Apple menu causes an immediate
- "illegal instruction" system error: the programme tries to execute an
- instruction not in any heap zone but happens to be 2 bytes off the proper
- allignment.
- This error occurs before any of my instructions are reached, i.e. a
- Debugstr call at the beginning of main is never executed.
- --
- Thanks for any hints I could be given!
- - -----------------------------------------------------------------------------
- Andreas Guelzow Dept. of Mathematics & Comp. Sc. Brandon University MB Canada
- Guelzow@BrandonU.Ca
-
-
-
- ---------------------------
-
- From: Bruce.Hoult@bbs.actrix.gen.nz
- Subject: Problems installing Object Master
- Date: 19 Feb 92 12:59:24 GMT
- Organization: Actrix Information Exchange
-
- I've just received my copy of Object Master and it won't run. Here's
- what happens:
-
- 1) I've installed Object Master as per the manual instructions, except
- that the file "Project Options" isn't in either the System 6 or System
- 7 Preferences Folder on the distribution disk (or anywhere else).
-
- 2) Double clicking Object Master brings up a dialog box asking for my
- name and the serial number. When I enter these, Object Master creates
- a "OBJECT MASTER(TM) Preferences" file in the Preferences Folder.
-
- 3) It then just sits there for about 5 seconds (and will not respond to
- clicks or attempted <cmd>-O's or anything) and then the program quits.
- Thee are no error messages from either the program or the system.
-
- 4) Subsequent attempts to run Object Master have the same effect, except
- that it does pick up my name (but not the serial number) from the
- "OBJECT MASTER(TM) Preferences" file.
-
- Help!
-
- I've tried it on both a 10 MB Mac LC (running 7.01 & 7-up) and an 8 MB
- Mac IIcx (running Z-7.0 & 7-up) with the same results. Booting without
- extensions doesn't help.
-
- --
- Bruce.Hoult@bbs.actrix.gen.nz Twisted pair: +64 4 477 2116
- BIX: brucehoult Last Resort: PO Box 4145 Wellington, NZ
- "Cray's producing a 200 MIPS personal computer with 64MB RAM and a 1 GB
- hard disk that fits in your pocket!" "Great! Is it PC compatable?"
-
-
-
- - -------------------------
-
- From: erik@netcom.com (Erik Robertson)
- Subject: Problems installing Object Master
- Date: 19 Feb 92 17:26:59 GMT
- Organization: Netcom - Online Communication Services (408 241-9760 guest)
-
- In article <1992Feb19.125924.29546@actrix.gen.nz> Bruce.Hoult@bbs.actrix.gen.nz writes:
- >I've just received my copy of Object Master and it won't run. Here's
- >what happens:
- >
- >1) I've installed Object Master as per the manual instructions, except
- > that the file "Project Options" isn't in either the System 6 or System
- > 7 Preferences Folder on the distribution disk (or anywhere else).
- >
- >2) Double clicking Object Master brings up a dialog box asking for my
- > name and the serial number. When I enter these, Object Master creates
- > a "OBJECT MASTER(TM) Preferences" file in the Preferences Folder.
- >
- >3) It then just sits there for about 5 seconds (and will not respond to
- > clicks or attempted <cmd>-O's or anything) and then the program quits.
- > Thee are no error messages from either the program or the system.
- >
-
- The "Project Options" is not needed any more in the final release as far as
- I know.
-
- The behavior Bruce describes is exactly what happens when you type in the WRONG
- SERIAL NUMBER threfore I believe Bruce made a mistake (upper/lower case? :-) )
- Otherwise call up acius tech support... (Fax: 408-252-0831)
-
- Good luck!
- --
- - -----------------------------------------------------------------------
- Erik ROBERTSON erik@netcom.com
- Mountain View, CA
- - -----------------------------------------------------------------------
-
-
-
- - -------------------------
-
- From: Bruce.Hoult@bbs.actrix.gen.nz
- Subject: Problems installing Object Master
- Date: 20 Feb 92 11:29:29 GMT
- Organization: Actrix Information Exchange
-
- In article <!bdhy7nerik@netcom.com> erik@netcom.com (Erik Robertson) writes:
- > The behavior Bruce describes is exactly what happens when you type in the WRONG
- > SERIAL NUMBER threfore I believe Bruce made a mistake (upper/lower case? :-) )
-
- No, I typed the correct serial number, as supplied with the program.
-
- Thanks to Jim Coons (coons%ct46.mrisi%mrsvr@uwm.edu) who emailed me to
- say that he'd had the same problem and that Acius had printed an
- incomplete serial number on the registration card. After email to
- their AppleLink acount went unanswered for 24 hours I got impatient
- and phoned them (It's kinda expensive from here in New Zealand) and
- was told to add (in my case) the digits "34" to the end of the printed
- serial number.
-
- This fixed the problem.
-
- Kudos to the Acius tech support person for fixing it within seconds
- (once I got through to them), but rotten onions for making the
- mistake in the first place and for not answering their email promptly.
-
- BTW, I've only played with the program for a few hours, but it looks great
- so far!
-
- --
- Bruce.Hoult@bbs.actrix.gen.nz Twisted pair: +64 4 477 2116
- BIX: brucehoult Last Resort: PO Box 4145 Wellington, NZ
- "Cray's producing a 200 MIPS personal computer with 64MB RAM and a 1 GB
- hard disk that fits in your pocket!" "Great! Is it PC compatable?"
-
-
-
- ---------------------------
-
- From: kemper@millelac.rhrk.uni-kl.de (Michael Kemper [Informatik])
- Subject: Book for TCL
- Organization: University of Kaiserslautern (Germany)
- Date: Wed, 19 Feb 1992 16:16:05 GMT
-
- Has anyone heard about a book called
-
- Borenstein, Philip
- Object-Oriented Programming Manual, 1990 Cupertino, Calif., USA,
- Symantec Corp.
-
- ????????????????????????????????????
-
- Does it describe TCL better than the manuals? Are there more examples? Is it worth the money (how much?)?
-
- Thank you in advance
-
-
- |\/|ichael |<emper
- University of Kaiserslautern
- Germany
-
- Disclaimer: ------------------------
- | Rent this space |
- | (nothing to disclaim) |
- ------------------------
-
-
-
- - -------------------------
-
- From: swb1_ltd@uhura.cc.rochester.edu (Steve Berkley)
- Subject: Book for TCL
- Date: 19 Feb 92 23:45:40 GMT
- Organization: University of Rochester - Rochester, New York
-
- In <1992Feb19.161605.27486@rhrk.uni-kl.de> kemper@millelac.rhrk.uni-kl.de (Michael Kemper [Informatik]) writes:
-
- >Has anyone heard about a book called
-
- >Borenstein, Philip
- >Object-Oriented Programming Manual, 1990 Cupertino, Calif., USA,
- >Symantec Corp.
-
- I'd be interested in finding a good book on TCL as well- I've never
- been able to get through the manual, although the new manual with 5.0
- is *much* improved....
-
-
-
- - -------------------------
-
- From: wbridgm@hubcap.clemson.edu (William T. Bridgman)
- Subject: Book for TCL
- Date: 20 Feb 92 03:21:51 GMT
- Organization: Clemson University
-
- kemper@millelac.rhrk.uni-kl.de (Michael Kemper [Informatik]) writes:
-
- >Has anyone heard about a book called
-
- >Borenstein, Philip
- >Object-Oriented Programming Manual, 1990 Cupertino, Calif., USA,
- >Symantec Corp.
- >Does it describe TCL better than the manuals? Are there more examples? Is it worth the money (how much?)?
- >Thank you in advance
- >|\/|ichael |<emper
- >University of Kaiserslautern
- >Germany
-
- >Disclaimer: ------------------------
- > | Rent this space |
- > | (nothing to disclaim) |
- > ------------------------
-
- The Object-Oriented Programming Manual is, in fact, one of the
- manuals which I received in my upgrade to THINK C v5.0. I suspect
- if you have the full manual set, it is among them.
-
- Tom
-
- - ---------------------------------------------------------------------
- | William T. "Tom" Bridgman, M.S. | wbridgm@hubcap.clemson.edu |
- | Department of Physics & Astronomy | |
- | Clemson University |"Black Holes under Construction.|
- | Clemson, SC 29634-1911 | WATCH YOUR STEP!" |
- - ---------------------------------------------------------------------
-
-
-
- ---------------------------
-
- From: dean@cs.mcgill.ca (Dean NEWTON)
- Subject: Problems using bison/flex with THINK C
- Date: 19 Feb 92 15:46:36 GMT
- Organization: SOCS, McGill University, Montreal, Canada
-
- I am a new user of the Mac and THINK C, trying to compile a program using
- Bison and Flex, ftp'ed from ftp.apple.com.
-
- I try including the ANSI library, and get the following link errors:
-
- undefined: alloca
- undefined: bcopy
- undefined: fileno
- undefined: read
- code segment too big (ANSI)
- data segment too big
-
- When I try to include the ANSI-small and unix libraries instead, I get:
-
- undefined: alloca
- undefined: bcopy
- data segment too big
-
- What gives? What does "code/data segment too big" mean? Where do I get
- alloca?
-
- I am running on a PowerBook 170, with 8M of virtual memory. I tried
- turning on 32 bit addressing, but that didn't seem to make any difference.
-
- Thanks.
-
-
-
- - -------------------------
-
- From: gtall@ogre.cica.indiana.edu (Gerry Allwein)
- Subject: Problems using bison/flex with THINK C
- Organization: Center for Innovative Computing Applications (CICA), Indiana University
- Date: 19 Feb 92 17:49:39 GMT
-
- In <1992Feb19.154636.29485@cs.mcgill.ca> dean@cs.mcgill.ca (Dean NEWTON) writes:
-
- >I am a new user of the Mac and THINK C, trying to compile a program using
- >Bison and Flex, ftp'ed from ftp.apple.com.
-
- >I try including the ANSI library, and get the following link errors:
-
- >undefined: alloca
- >undefined: bcopy
- >undefined: fileno
- >undefined: read
- >code segment too big (ANSI)
- >data segment too big
-
- >When I try to include the ANSI-small and unix libraries instead, I get:
-
- >undefined: alloca
- >undefined: bcopy
- >data segment too big
-
- >What gives? What does "code/data segment too big" mean? Where do I get
- >alloca?
-
- You should see alloca.a in the files for Bison. You need to assemble and
- link that in with your program. Not sure about bcopy or data segment
- being too big. Maybe the parser you have generated has a lot of stuff.
- One thing you might try is to use a compiler directive that puts C string
- data in with a code module. I'm sure there is all sorts of Apple Thought
- Police policies for not doing that but MPW likes to put them in the global
- data section as a default and that isn't cool at all. So I use the -b2
- compiler flag.
-
- Gerry
-
-
-
- - -------------------------
-
- From: neeri@iis.ethz.ch (Matthias Ulrich Neeracher)
- Subject: Problems using bison/flex with THINK C
- Date: 20 Feb 92 19:00:18 GMT
- Organization: Integrated Systems Laboratory, ETH, Zurich
-
- In article <gtall.698521779@ogre> gtall@ogre.cica.indiana.edu (Gerry Allwein) writes:
- >In <1992Feb19.154636.29485@cs.mcgill.ca> dean@cs.mcgill.ca (Dean NEWTON) writes:
- >
- >>I am a new user of the Mac and THINK C, trying to compile a program using
- >>Bison and Flex, ftp'ed from ftp.apple.com.
- >
- >>I try including the ANSI library, and get the following link errors:
- >
- >>undefined: alloca
- >>undefined: bcopy
- >>undefined: fileno
- >>undefined: read
- >>code segment too big (ANSI)
- >>data segment too big
- >
- >>When I try to include the ANSI-small and unix libraries instead, I get:
- >
- >>undefined: alloca
- >>undefined: bcopy
- >>data segment too big
- >
- >>What gives? What does "code/data segment too big" mean? Where do I get
- >>alloca?
- >
- >You should see alloca.a in the files for Bison. You need to assemble and
- >link that in with your program.
-
- There should also be an alloca.c, which is preferable to alloca.a. The .c
- version is less efficient, but the .a version tends to break on some C
- compilers and Think C prefers C source to Assembler source :-)
-
- >Not sure about bcopy
-
- bcopy is a berkleyism that can be reconciled in the civilised world by
- including somewhere either:
-
- #define bcopy(s1,s2,l) memcpy(s2,s1,l)
-
- or
-
- void bcopy(s1,s2,l)
- void * s1;
- void * s2;
- int l;
- {
- memcpy(s2,s1,l);
- }
-
- Note that s1 and s2 are *reversed*. I trust your good judgement which version
- to use.
-
- >or data segment being too big.
- >Maybe the parser you have generated has a lot of stuff.
-
- Bison and Flex tend to generate tables that can get pretty big. Sorry, no quick
- and dirty fixes here. All you can try is to put the Flex file and the Bison
- file into separate segments and use Gerry's idea:
-
- >One thing you might try is to use a compiler directive that puts C string
- >data in with a code module. I'm sure there is all sorts of Apple Thought
- >Police policies for not doing that but MPW likes to put them in the global
- >data section as a default and that isn't cool at all. So I use the -b2
- >compiler flag.
-
- This idea is neat, but unfortunately all of the data gets allocated in the Flex
- and Bison files, and sometimes even one of these is too big.
-
- A last resort is to take apart the lexical scanner into several flex passes. I
- had to do this for a project, but it's a real horror.
-
- Matthias
-
- - ---
- Matthias Neeracher neeri@iis.ethz.ch
- "C'THULHU FOR PRESIDENT
- For people who are tired of voting the LESSER of two evils !"
- -- Greble Dagmar <dagmar@brainiac.raidernet.com>
-
-
-
- - -------------------------
-
- From: e-sink@uiuc.edu (Eric W. Sink)
- Subject: Problems using bison/flex with THINK C
- Date: 20 Feb 92 14:13:44 GMT
- Organization: University of Illinois at Urbana-Champaign
-
- In <1992Feb19.154636.29485@cs.mcgill.ca> dean@cs.mcgill.ca (Dean NEWTON) writes:
-
- >I am a new user of the Mac and THINK C, trying to compile a program using
- >Bison and Flex, ftp'ed from ftp.apple.com.
-
- >I try including the ANSI library, and get the following link errors:
-
- >undefined: alloca
- >undefined: bcopy
- >undefined: fileno
- >undefined: read
- >code segment too big (ANSI)
- >data segment too big
-
- >When I try to include the ANSI-small and unix libraries instead, I get:
-
- >undefined: alloca
- >undefined: bcopy
- >data segment too big
-
- >What gives? What does "code/data segment too big" mean? Where do I get
- >alloca?
-
- >I am running on a PowerBook 170, with 8M of virtual memory. I tried
- >turning on 32 bit addressing, but that didn't seem to make any difference.
-
- 1. If you are not, you should be using Think C 5.0
- 2. If your ARE using Think C 5.0, you should turn on far code and far data
- Without these options, there is 32k limit on code segments, and global
- data.
- 3. As someone else suggested, get alloca from the Bison distribution.
- 4. fileno and read are in the unix library.
- 5. I'd recommend using Berkeley Yacc instead of Bison anyway.
-
- --
- Eric W. Sink, Spatial Analysis and Systems Team
- USACERL, P.O. Box 9005, Champaign, IL 61826-9005
- 1-800-USA-CERL x449, e-sink@uiuc.edu
-
-
-
- - -------------------------
-
- From: d88-jwa@hemul.nada.kth.se (Jon W{tte)
- Subject: Problems using bison/flex with THINK C
- Date: 20 Feb 92 19:34:19 GMT
- Organization: Royal Institute of Technology, Stockholm, Sweden
-
- .ch> neeri@iis.ethz.ch (Matthias Ulrich Neeracher) writes:
-
- Bison and Flex tend to generate tables that can get pretty big. Sorry, no quick
- and dirty fixes here. All you can try is to put the Flex file and the Bison
- file into separate segments and use Gerry's idea:
-
- Upgrade to Think C 5.0 that supports "far data" ?
-
-
- "C'THULHU FOR PRESIDENT
-
- Yes ! Yes ! Feel the deep space evil seep into your body, fear tears
- your ... oops, wrong group.
-
- --
- This Signature is distributed under the conditions of the Signature License,
- available at a fee from h+@nada.kth.se (Jon W{tte) Reading the Signature
- implies that you accept to be bound by the terms in said License. Should you
- not agree on any of these terms, you must return the Signature unread to me.
-
-
-
- ---------------------------
-
- From: gb2a+@andrew.cmu.edu (George J. Baxter)
- Subject: TCL tool palette code?
- Date: 19 Feb 92 16:54:30 GMT
- Organization: Science & Technology Center, Carnegie Mellon, Pittsburgh, PA
-
- Hey!
- I'm fighting to learn TCL, and it's a rather overwhelming task at
- times.. for example, I'm trying to create a simple little tool palette,
- via creating a subclass of CGridSelector, just like the book sez to do.
- Well, funny thing, it's not receiving any clicks or update events. Does
- anyone have any (basic) suggestions or (basic again) example code I
- could see? Thanks.
- George Baxter
- - ---------------------
- gb2a@andrew.cmu.edu baxter@a.cfr.cmu.edu
-
- baxter@imga.cfr.cmu.edu q100gb2a@vb.cc.cmu.edu
-
- "Only a Hawaiian can say Humuhumunukunukuapuaa five times fast, correctly."
-
-
-
- - -------------------------
-
- Subject: TCL tool palette code?
- From: guelzow@brandonu.ca
- Date: 20 Feb 92 08:58:26 CST
- Organization: Brandon University, Brandon, Manitoba, Canada
-
- In article <cdccj6i00WBK43D2o=@andrew.cmu.edu>,
- gb2a+@andrew.cmu.edu (George J. Baxter) writes:
- > Hey!
- > I'm fighting to learn TCL, and it's a rather overwhelming task at
- > times.. for example, I'm trying to create a simple little tool palette,
- > via creating a subclass of CGridSelector, just like the book sez to do.
- > Well, funny thing, it's not receiving any clicks or update events. Does
- > anyone have any (basic) suggestions or (basic again) example code I
- > could see? Thanks.
- The Artclass Demo contains an example of a tool palette.
- - -----------------------------------------------------------------------------
- Andreas Guelzow Dept. of Mathematics & Comp. Sc. Brandon University MB Canada
- Guelzow@BrandonU.Ca
-
-
-
- ---------------------------
-
- From: Roger.W.Brown@dartmouth.edu (Roger W. Brown)
- Subject: CTB CMChoose question
- Date: 19 Feb 92 18:18:05 GMT
- Organization: Dartmouth College, Hanover, NH
-
- The Communications ToolBox Connection Manager has a function called
- CMChoose that can be used to configure a connection. The first
- parameter is a connection handle. If you pass an existing connection
- handle in and the user chooses to use a different type of connection
- (say from a Serial to an ADSP tool), CMChoose disposes the original
- connection, makes a new one of the chosen type and returns it in the
- connection handle parameter, and returns chooseOKMajor.
-
- If the connection handle passed to CMChoose is NIL and the user chooses
- a connection other than the one first displayed, CMChoose also returns
- chooseOKMajor but does not dispose the original connection (because it
- was NIL, so that's ok) and DOES NOT CREATE a new connection of the
- chosen type.
- It returns a NIL in the connection handle parameter.
-
- This is all find except in the following case: The user cannot choose a
- new type of tool to use unless one was chosen somehow beforehand and
- created. CMChoose does not return any information about which tool was
- chosen unless it starts with a connection and creates a new one. The
- sample code suggests that you always create some connection first, by
- choosing the first one it finds.
-
- If the first tool it finds is one that it cannot create (for example a
- TCP tool that requires MacTCP to be present but is not present), then
- the user has no way to choose another tool within the program. The only
- way is to remove that tool fom the extensions folder using the Finder -
- a non-intuitive user interface.
-
- So, does anyone know how to find out the chosen tool in CMChoose when
- there was no connection to begin with? Or some alternative method of
- giving the user a choice of tools before creating any one tool. I
- realize that another dialog with a list of tool names could be made
- easily enough, but that would be a different interface to present to
- the user that does not allow configuration of the tool as well.
- Confusing.
-
- - ---------------------------------------------------------------
- Roger Brown Roger.W.Brown@dartmouth.edu
- Courseware Development
- Dartmouth College, Hanover, NH
-
-
-
- - -------------------------
-
- From: dorner@pequod.cso.uiuc.edu (Steve Dorner)
- Subject: CTB CMChoose question
- Organization: University of Illinois at Urbana-Champaign
- Date: Wed, 19 Feb 1992 21:16:12 GMT
-
- Roger.W.Brown@dartmouth.edu (Roger W. Brown) writes:
- >sample code suggests that you always create some connection first, by
- >choosing the first one it finds.
- >
- >If the first tool it finds is one that it cannot create (for example a
- >TCP tool that requires MacTCP to be present but is not present), then
- >the user has no way to choose another tool within the program
-
- Perhaps tool writers should not do such checking until listen or open time.
- Of course, one of the weaknesses of the CTB is that you have to write
- to the least common denominator; ie, the stupid tool.
-
- How about a loop:
-
- for(i=1;;i++)
- {
- if (CRMGetIndToolName(classCM,1,toolName)) return(WarnUser(NO_CTB_TOOLS));
- if ((procID=CMGetProcID(toolName))>=0 &&
- (CnH = CMNew(procID,flags,bs,nil,nil))) break;
- }
- --
- Steve Dorner, U of Illinois Computing Services Office
- Internet: s-dorner@uiuc.edu UUCP: uunet!uiucuxc!uiuc.edu!s-dorner
-
-
-
- ---------------------------
-
- From: brunner@brchh87.bnr.ca (James Brunner)
- Subject: Want a preferences-file object? (was Re: Preference files: best way?)
- Date: 19 Feb 92 18:13:40 GMT
-
- Jamie, I can't seem to E-mail to you. But I for one am interested in
- a preferences file class. Could you please E-mail to me or post.
-
- By the way, here's my contribution. The CObject class has an error that
- you'll probably never hit, but here it is. In the routine that returns the
- name of a class, they truncate the length to 256 to fit into a Str255
- variable. Like this (from memory so the names may be different):
- length = Min(length,sizeof(Str255));
- This should be
- length = Min(length,sizeof(Str255)-1);
- or
- length = Min(length,255);
-
- (Of course the sizeof a Str255 is 256 because of the addition of the length
- byte).
- --
- - -------------------------------------------------------------------------
- Jim Brunner - (brunner@brchh87.BNR.CA)
- All opinions are my own and have nothing whatsoever to do with BNR, NT,
- NTI, Bell Canada, or any of the BCE corporations or affiliates.
-
-
-
- - -------------------------
-
- From: nick@dcs.ed.ac.uk (Nick Rothwell)
- Subject: Want a preferences-file object? (was Re: Preference files: best way?)
- Date: 20 Feb 92 10:40:21 GMT
- Organization: Friends of the Salter Duck
-
- I've written one already; it's on the THINK C archive machine
- (ics.uci.edu), file cpreferences.hqx.
-
- Nick.
- --
- Nick Rothwell, LFCS, Edinburgh | "Chai ch t'chai ch't chnna chnna chnna ch'th
- nick@dcs.ed.ac.uk | Chai ch t'chai ch't chuth chena chann ch'tt
- Mentation Consultancy Services | Chie ch t'chie ch t'chaaa chn chattr chattr"
- cassiel@cix.compulink.co.uk | -- Wavestation, V3 software, my dragon.
-
-
-
- ---------------------------
-
- From: wdburns@mtu.edu (Bill Burns)
- Subject: mounting a remote drive. Source code request...
- Date: 19 Feb 92 22:59:04 GMT
- Organization: CCLI Macintosh Lab
-
- Greetings Net-landers!
-
- I am trying to write an application that will eliminate the need for
- using "Chooser" to log into our network. I see that there is a way to
- mount disks under system 7.x . I'm trying to implememt these new routines
- using Think C... does anyone have any idea or sample code on how to do this.
-
- Any code (either for system 6 or 7) would be appreciated. I'm familiar
- with programming on the mac, but I need some help wrt Sys7 and AppleTalk.
-
- Any help would be appreciated....
-
- Thanks
- Bill Burns (wdburns@mtu.edu)
- Machintosh Technical Consultant,
- CCLI Lab, MTU
-
-
-
- - -------------------------
-
- From: tagreen@bronze.ucs.indiana.edu (Todd Green)
- Subject: mounting a remote drive. Source code request...
- Date: 20 Feb 92 21:23:51 GMT
- Organization: Indiana University
-
- In article <1992Feb19.225904.28549@ctr.columbia.edu> wdburns@mtu.edu (Bill Burns) writes:
- >I am trying to write an application that will eliminate the need for
- >using "Chooser" to log into our network. I see that there is a way to
- >mount disks under system 7.x . I'm trying to implememt these new routines
- >using Think C... does anyone have any idea or sample code on how to do this.
-
- I just finished writting an INIT/application pair that checks to see
- if a volume is mounted, and if it isn't the INIT will log into a
- server and mount a volume. It works under both system 6 and 7 using an
- XCMD written by someone at Apple and was based on the code in RevRDist.
-
- The application allows you to configure the INIT by specifying the
- primary volume, backup volume, backup zone, backup server name,
- username, and password. (Of course the password is encrypted).
-
- This was to implement a redundancy system for our public clusters at
- Indiana University.
-
- If anyone is interested in the code/project send me email and as soon
- as I clear it with the "higher ups" I'll mail you a copy. It is
- pretty well documented (both in the code and with separate docs), but
- is still in its final beta stage. It has been running for the last
- month in our clusters without a hitch.
-
- Have a good one,
- Todd
- P.S. Oh, it's written in THINK C 5.0.2, if that is of importance to
- you :)
- --
- - --
- Internet: tagreen@bronze.ucs.indiana.edu
- NeXTMail: tagreen@marmoset.ucs.indiana.edu
- Bitnet: tagreen@iubacs.bitnet
-
-
-
- ---------------------------
-
- From: crocker@rtsg.mot.com (Ronald T. Crocker)
- Subject: APDA
- Organization: Motorola Inc., Cellular Infrastructure Group
- Date: Wed, 19 Feb 1992 21:40:39 GMT
-
- Can anyone send me the phone number for APDA? (Or, better yet, if this
- happens to be a FAQ, send me the FAQ file!)
-
- Thanks!
-
- --
- Ron Crocker
- Motorola Radio-Telephone Systems Group, Cellular Infrastructure Group
- (708) 632-4752 [FAX: (708) 632-4430]
- crocker@mot.com or uunet!motcid!crocker
-
-
-
- - -------------------------
-
- From: vvann@umbio.med.miami.edu (Vince Vann)
- Subject: APDA
- Date: 20 Feb 92 01:53:41 GMT
- Organization: University of Miami Medical School
-
- crocker@rtsg.mot.com (Ronald T. Crocker) writes:
-
- >Can anyone send me the phone number for APDA? (Or, better yet, if this
- >happens to be a FAQ, send me the FAQ file!)
-
- APDA order number is 800-282-2732.
-
- --
- Vincent Vann
- vvann@umbio.med.miami.edu
-
-
-
- ---------------------------
-
- From: jxs18@po.CWRU.Edu (Jerry Sy)
- Subject: Bad F-Line Instruction and MSWORD?
- Organization: Case Western Reserve University, Cleveland, OH (USA)
- Date: Thu, 20 Feb 92 03:21:04 GMT
-
-
- In a previous article, ptrubey@netcom.com (Phil Trubey) says:
-
- >Lately I have been experiencing frequent crashes on my System 7 machine
- >while running MS Word v4. A bomb box will randomly (seemingly) appear that
- >says 'Bad F-Line Instruction'. This is starting to get really annoying, to
- >say the least. Any ideas on what might be causing it (other than
- >Word 4?).
- >--
- >
- I have been getting this Bad F-Line error messages myself running
- Hypercard, MitemView and Omnis.
-
- What is BAD F-Line Error ?
-
- jerry
-
-
-
-
-
- - -------------------------
-
- From: gyoungs@isis.cs.du.edu (Greg Youngs)
- Subject: Bad F-Line Instruction and MSWORD?
- Organization: University of Denver, Dept. of Math & Comp. Sci.
- Date: Thu, 20 Feb 92 03:58:04 GMT
-
-
- Frequent crashes in Word 4 with System 7:
-
- Try letting Word create a new Word Settings (4) file in the System
- folder (remove, delete the one there).
-
- check to see the system passes ResEdit verify.
- Run DFA (7.0 of course) on the drive.
- Reinstall the system.
-
- Figure you have anything from bad scsi to full moon!
-
- The March Hare
-
-
-
-
- - -------------------------
-
- From: d88-jwa@dront.nada.kth.se (Jon W{tte)
- Subject: Bad F-Line Instruction and MSWORD?
- Date: 20 Feb 92 10:57:03 GMT
- Organization: Royal Institute of Technology, Stockholm, Sweden
-
- .ins.cwru.edu> jxs18@po.CWRU.Edu (Jerry Sy) writes:
-
- In a previous article, ptrubey@netcom.com (Phil Trubey) says:
-
- >Lately I have been experiencing frequent crashes on my System 7 machine
- >while running MS Word v4. A bomb box will randomly (seemingly) appear that
- >says 'Bad F-Line Instruction'. This is starting to get really annoying, to
-
- What is BAD F-Line Error ?
-
- It's either a) a program tried to use an FPU that wasn't there or
- b) a program executed an illegal FPU instruction. The usual cause
- is either a program/INIT zapping memory, or a bug that makes the
- program get "off track" and try to execute things that are not
- code.
-
- --
- This Signature is distributed under the conditions of the Signature License,
- available at a fee from h+@nada.kth.se (Jon W{tte) Reading the Signature
- implies that you accept to be bound by the terms in said License. Should you
- not agree on any of these terms, you must return the Signature unread to me.
-
-
-
- - -------------------------
-
- From: Bill Williams
- Subject: Bad F-Line Instruction and MSWORD?
- Date: 20 Feb 92 17:32:26 GMT
-
- In article <1992Feb20.032104.27028@usenet.ins.cwru.edu> jxs18@po.CWRU.Edu
- (Jerry Sy) writes:
- >
- > In a previous article, ptrubey@netcom.com (Phil Trubey) says:
- >
- > >Lately I have been experiencing frequent crashes on my System 7 machine
- > >while running MS Word v4.
-
- I've been getting the same thing with EXCEL; also a fair number of "illegal
- instruction" bombs. Microsoft says it's my other INITs. Reminds me of an old
- IBM shiboleth: "It must be your cards." So what IS it?
-
- -W2
-
-
-
- - -------------------------
-
- From: bjornl@milton.u.washington.edu (Bjorn Levidow)
- Subject: Bad F-Line Instruction and MSWORD?
- Organization: University of Washington, Seattle
- Date: Fri, 21 Feb 1992 01:28:40 GMT
-
- In article <11375@umd5.umd.edu> Bill Williams writes:
-
- >> >Lately I have been experiencing frequent crashes on my System 7 machine
- >> >while running MS Word v4.
- >
- >I've been getting the same thing with EXCEL; also a fair number of "illegal
- >instruction" bombs. Microsoft says it's my other INITs. Reminds me of an old
- >IBM shiboleth: "It must be your cards." So what IS it?
- >
- > -W2
-
- I can get EXCEL to bomb with either an illegal instruction or Bad F-Line error
- if I it is running in less than 1536K under system 7. If it is running with
- more memory than that, which is the suggested size, then it works just fine.
- I think the problem is that EXCEL doesn't complain if there is too little
- memory available to launch it. It launches and then crashes later. I doubt
- that it is an init problem.
-
- ===============================================================================
- \ Bjorn Levidow | Romance is unreal...it's the essence /
- \ Dept. of Psychology NI-25 | of life, but not the reality of it. /
- \ University of Washington | ---Robyn Hitchcock /
- \ Seattle, WA 98195 | It's mine! All mine! /
- \ bjornl@u.washington.edu | I'm independently thoughtful! /
- ===============================================================================
-
-
-
-
- ---------------------------
-
- From: wbridgm@hubcap.clemson.edu (William T. Bridgman)
- Subject: How do you use ANSI and multitasking under THINK C & System 7.0?
- Date: 20 Feb 92 03:31:29 GMT
- Organization: Clemson University
-
- I am running THINK C under System 7.0 and writing programs using
- the ANSI library which can be ported between the Mac and
- DECstations. However, I'm growing tired of having to wait for one
- of these programs to finish on the Mac before I can run other
- programs. The obvious solution is to incorporate some calls to the
- Mac O/S to handle this and place them inside #ifdef THINK_C.
-
- My question is, how does one go about this? While I am somewhat
- familiar with the Mac Toolbox, I've not worked with the
- multitasking capabilities.
-
- Has anyone out there done this, or alternately, is a TechNote
- available which would tell me what I need to know to try and
- implement this capability?
-
- Thanks...Tom
-
- - ---------------------------------------------------------------------
- | William T. "Tom" Bridgman, M.S. | wbridgm@hubcap.clemson.edu |
- | Department of Physics & Astronomy | |
- | Clemson University |"Black Holes under Construction.|
- | Clemson, SC 29634-1911 | WATCH YOUR STEP!" |
- - ---------------------------------------------------------------------
-
-
-
- - -------------------------
-
- From: mkahl@world.std.com (Michael Kahl)
- Subject: How do you use ANSI and multitasking under THINK C & System 7.0?
- Date: 20 Feb 92 17:32:23 GMT
- Organization: Enginuity Inc.
-
- In article <1992Feb20.033129.15156@hubcap.clemson.edu> wbridgm@hubcap.clemson.edu (William T. Bridgman) writes:
- >I am running THINK C under System 7.0 and writing programs using
- >the ANSI library which can be ported between the Mac and
- >DECstations. However, I'm growing tired of having to wait for one
- >of these programs to finish on the Mac before I can run other
- >programs. The obvious solution is to incorporate some calls to the
- >Mac O/S to handle this and place them inside #ifdef THINK_C.
- >
- >My question is, how does one go about this? While I am somewhat
- >familiar with the Mac Toolbox, I've not worked with the
- >multitasking capabilities.
-
- All you need to do is set the console mode to "raw" and call getchar. In raw
- mode, getchar will return right away if nothing has been typed, but it will
- magically take care of processing events and allow your program to be placed
- into the background. (If you want your program to continue processing while
- in the background, be sure to set the "Background Null Events" flag in the "Set
- Project Type..." dialog box.)
-
- If you program is computing long enough for it to bother you that you can't
- switch out, it's probably also long enough that the user may need to abort it.
- As long as you're calling getchar, why not test for (say) a ctrl-C?
-
- Here's some (untested) code:
-
- // before beginning a long computation:
- csetmode(C_RAW, stdin);
-
- // at intervals during the computation:
- if (getchar() == '\3')
- raise(SIGINT);
-
- // afterwards (if desired):
- csetmode(C_ECHO, stdin);
- --
- Michael Kahl, Software Architect, Enginuity Inc.
- mkahl@world.std.com -or- 75236.3146@compuserve.com
- Disclaimer: Whoa! Did I say THAT??!
-
-
-
- ---------------------------
-
- From: costin@cogsci.ucsd.EDU (Dan Costin)
- Subject: Think C libraries with Think Pascal projects, how?
- Date: 20 Feb 92 05:16:35 GMT
- Organization: Department of Cognitive Science, UCSD
-
- I'm trying to use a library I created with Think C in a Think Pascal
- project. Is this possible? What are the rules?
- Since I had a sprintf in my C code, I had to include ANSI.lib. But even
- ANSI-small gave me some multiple defines when I included the library
- in Think Pascal (specifically RENAME, __OPEN and __CLOSE). So I rewrote
- the code using strcpy and strcat and wrote my own itoa and ftoa routines.
- OK, got rid of that problem. But another conflict I came across is
- that if I included MacTraps I got a whole bunch of conflicts, and if
- I didn't I was missing CtoPstr and NewPtrSys. So I wrote my own versions
- of those two. Now I get no link errors, but the first call to the
- C library routines bombs. All the C functions are declared as pascal,
- and I have a unit that tells the Pascal program what the arguments
- look like.
-
- So why am I bombing? First thing the C routine does is beep,
- and the beeps come through. Then a window that's supposed to come up
- does come up (just the border), but then comes a bus error.
- The C routines work flawlessly
- when used with a C project. Am I missing something crucial?
- Is there a problem with Pascal providing the glue code for the C
- Toolbox calls? How do I include the C glue code (which I presume is
- in MacTraps) and not get multiple defines when I include the library in
- Pascal?
-
- Any pointers to where this type of inter-language communication might
- be described would be much appreciated. Thanks.
- -dan
-
-
-
- - -------------------------
-
- From: siegel@world.std.com (Rich Siegel)
- Subject: THINK C Libraries in THINK Pascal Projects
- Date: 20 Feb 92 21:44:41 GMT
- Organization: Symantec Language Products Group
-
- In article <743@cogsci.ucsd.EDU> costin@cogsci.ucsd.EDU (Dan Costin) writes:
- >I'm trying to use a library I created with Think C in a Think Pascal
- >project. Is this possible? What are the rules?
-
- The rules are:
-
- 1) Any Pascal-callable entry point should be declared 'pascal'.
-
- 2) It's best not to use ANSI library code, because of naming and runtime
- architecture conflicts. If you need certain portions (such as the string
- routines), you can add the appropriate ANSI source file (e.g. "str.c") to
- the C project that you're using to build the library.
-
- 3) It's not necessary to include the MacTraps or MacTraps2 libraries in
- the C library's project. THINK Pascal's "Interface.o" has the necessary
- ROM glue code in it.
-
- 4) To prepare a library with CtoPstr and PtoCstr in it, do the following:
- - make a duplicate of your MacTraps project, called "CPStr".
- - open this duplicate project in THINK C
- - use "Remove" to remove all of the entries EXCEPT "CPStr.Lib"
- - use "Build Library" to build a library
- - add the resulting library to your Pascal project (this avoids
- duplicate definitions when you have multiple C projects that
- might use CtoPstr).
-
- 5) Make sure that the "external" pascal declarations for the C libraries
- EXACTLY match the corresponding C declarations.
-
- > missing NewPtrSys
-
- According to C 5.0's <Memory.h>, NewPtrSys() is an inline, so no external
- reference is made. In THINK Pascal, NewPtrSys is in the glue, but since
- you're using an inline, it doesn't matter. As an alternative, place the
- following declaration in the file that calls NewPtrSys():
-
- extern pascal Ptr NewPtrSys(long);
-
- ...and see if that makes a difference.
-
- >So why am I bombing?
-
- Have you stepped through it in MacsBug to see where it's crashing and why?
- There are no magic answers to problems like this, and sometimes it's necessary
- to use a machine-level debugger to diagnose exactly what the problem is.
-
- R.
-
- --
- - ---------------------------------------------------------------------
- Rich Siegel Internet: siegel@world.std.com
- Senior Software Engineer Applelink: SIEGEL
- Symantec Languages Group
-
-
-
- ---------------------------
-
- End of C.S.M.P. Digest
- **********************
-